package gui;

import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.JTextPane;
import javax.swing.SwingConstants;

public class StorePanel extends JPanel {

	private JTextField txtPurchaseAmount1;
	private JTextField txtPurchaseAmount2;
	private JTextField txtPurchaseAmount3;
	private JTextField txtPurchaseAmount4;
	private JTextField txtPurchaseAmount5;
	private JTextField txtPurchaseAmount6;
	
	private JLabel lblWagonTongue;
	private JLabel lblWagonWheel;
	private JLabel lblWagonAxle;
	private JLabel lblClothes;
	private JLabel lblFood;
	private JLabel lblOxen;
	
	private JLabel lblStoreQty1;
	private JLabel lblStoreQty2;
	private JLabel lblStoreQty3;
	private JLabel lblStoreQty4;
	private JLabel lblStoreQty5;
	private JLabel lblStoreQty6;
	
	private JLabel lblStorePrice6;
	private JLabel lblStorePrice5;
	private JLabel lblStorePrice4;
	private JLabel lblStorePrice3;
	private JLabel lblStorePrice2;
	private JLabel lblStorePrice1;
	
	private JLabel lblStoreWeight6;
	private JLabel lblStoreWeight5;
	private JLabel lblStoreWeight4;
	private JLabel lblStoreWeight3;
	private JLabel lblStoreWeight2;
	private JLabel lblStoreWeight1;
	
	private JLabel lblStoreName;
	private JLabel lblPlayerMoney;
	private JLabel lblPlayerWagonWeight;
	private JLabel lblPrice;
	private JLabel lblWeight;
	private JLabel lblQuantity;
	private JLabel lblItemName;
	private JLabel lblPurchaseAmount;
	
	private JButton btnPurchase;
	private JButton btnLeaveStore;
	private JLabel lblHelpText;
	
	private boolean isFirstStore;
	
	/**
	 * Create the panel.
	 */
	public StorePanel() {
		isFirstStore = true;
		
		setLayout(null);
		
		lblPlayerMoney = new JLabel("Player Money: $<UserMoney>");
		lblPlayerMoney.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblPlayerMoney.setBounds(52, 62, 314, 25);
		add(lblPlayerMoney);

		lblPlayerWagonWeight = new JLabel("Total Weight: 0lbs / 150lbs");
		lblPlayerWagonWeight.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblPlayerWagonWeight.setBounds(52, 93, 314, 25);
		add(lblPlayerWagonWeight);

		lblFood = new JLabel("Food");
		lblFood.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblFood.setBounds(72, 212, 123, 16);
		add(lblFood);

		lblClothes = new JLabel("Clothes");
		lblClothes.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblClothes.setBounds(72, 241, 123, 16);
		add(lblClothes);

		lblWagonAxle = new JLabel("Wagon Axle");
		lblWagonAxle.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblWagonAxle.setBounds(72, 270, 123, 16);
		add(lblWagonAxle);

		lblOxen = new JLabel("Oxen");
		lblOxen.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblOxen.setBounds(74, 183, 123, 16);
		add(lblOxen);

		lblWagonWheel = new JLabel("Wagon Wheel");
		lblWagonWheel.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblWagonWheel.setBounds(72, 299, 123, 16);
		add(lblWagonWheel);

		lblWagonTongue = new JLabel("Wagon Tongue");
		lblWagonTongue.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblWagonTongue.setBounds(72, 328, 123, 16);
		add(lblWagonTongue);

		lblStoreQty1 = new JLabel("<Store Qty>");
		lblStoreQty1.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreQty1.setBounds(191, 183, 67, 16);
		add(lblStoreQty1);

		lblStoreQty2 = new JLabel("<Store Qty>");
		lblStoreQty2.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreQty2.setBounds(191, 212, 67, 16);
		add(lblStoreQty2);

		lblStoreQty3 = new JLabel("<Store Qty>");
		lblStoreQty3.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreQty3.setBounds(191, 241, 67, 16);
		add(lblStoreQty3);

		lblStoreQty4 = new JLabel("<Store Qty>");
		lblStoreQty4.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreQty4.setBounds(191, 270, 67, 16);
		add(lblStoreQty4);

		lblStoreQty5 = new JLabel("<Store Qty>");
		lblStoreQty5.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreQty5.setBounds(191, 299, 67, 16);
		add(lblStoreQty5);

		lblStoreQty6 = new JLabel("<Store Qty>");
		lblStoreQty6.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreQty6.setBounds(191, 328, 67, 16);
		add(lblStoreQty6);

		lblStorePrice1 = new JLabel("$<Store Price>");
		lblStorePrice1.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStorePrice1.setBounds(300, 183, 95, 16);
		add(lblStorePrice1);

		lblStorePrice2 = new JLabel("$<Store Price>");
		lblStorePrice2.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStorePrice2.setBounds(300, 212, 95, 16);
		add(lblStorePrice2);

		lblStorePrice3 = new JLabel("$<Store Price>");
		lblStorePrice3.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStorePrice3.setBounds(300, 241, 95, 16);
		add(lblStorePrice3);

		lblStorePrice4 = new JLabel("$<Store Price>");
		lblStorePrice4.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStorePrice4.setBounds(300, 270, 95, 16);
		add(lblStorePrice4);

		lblStorePrice5 = new JLabel("$<Store Price>");
		lblStorePrice5.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStorePrice5.setBounds(300, 299, 95, 16);
		add(lblStorePrice5);

		lblStorePrice6 = new JLabel("$<Store Price>");
		lblStorePrice6.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStorePrice6.setBounds(300, 328, 95, 16);
		add(lblStorePrice6);

		lblStoreWeight1 = new JLabel("$<Item Weight>");
		lblStoreWeight1.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreWeight1.setBounds(420, 183, 95, 16);
		add(lblStoreWeight1);

		lblStoreWeight2 = new JLabel("$<Item Weight>");
		lblStoreWeight2.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreWeight2.setBounds(420, 212, 95, 16);
		add(lblStoreWeight2);

		lblStoreWeight3 = new JLabel("$<Item Weight>");
		lblStoreWeight3.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreWeight3.setBounds(420, 241, 95, 16);
		add(lblStoreWeight3);

		lblStoreWeight4 = new JLabel("$<Item Weight>");
		lblStoreWeight4.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreWeight4.setBounds(420, 270, 95, 16);
		add(lblStoreWeight4);

		lblStoreWeight5 = new JLabel("$<Item Weight>");
		lblStoreWeight5.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreWeight5.setBounds(420, 299, 95, 16);
		add(lblStoreWeight5);

		lblStoreWeight6 = new JLabel("$<Item Weight>");
		lblStoreWeight6.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblStoreWeight6.setBounds(420, 328, 95, 16);
		add(lblStoreWeight6);

		lblItemName = new JLabel("Item Name");
		lblItemName.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblItemName.setBounds(52, 143, 134, 16);
		add(lblItemName);

		lblQuantity = new JLabel("Quantity/Pack");
		lblQuantity.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblQuantity.setBounds(171, 143, 134, 16);
		add(lblQuantity);

		lblPrice = new JLabel("Price");
		lblPrice.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblPrice.setBounds(320, 143, 95, 16);
		add(lblPrice);

		lblWeight = new JLabel("Weight");
		lblWeight.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblWeight.setBounds(420, 143, 95, 16);
		add(lblWeight);

		txtPurchaseAmount1 = new JTextField();
		txtPurchaseAmount1.setFont(new Font("Tahoma", Font.PLAIN, 10));
		txtPurchaseAmount1.setText("");
		txtPurchaseAmount1.setBounds(544, 182, 129, 18);
		add(txtPurchaseAmount1);
		txtPurchaseAmount1.setColumns(10);

		txtPurchaseAmount2 = new JTextField();
		txtPurchaseAmount2.setText("");
		txtPurchaseAmount2.setFont(new Font("Tahoma", Font.PLAIN, 10));
		txtPurchaseAmount2.setColumns(10);
		txtPurchaseAmount2.setBounds(544, 211, 129, 18);
		add(txtPurchaseAmount2);

		txtPurchaseAmount3 = new JTextField();
		txtPurchaseAmount3.setText("");
		txtPurchaseAmount3.setFont(new Font("Tahoma", Font.PLAIN, 10));
		txtPurchaseAmount3.setColumns(10);
		txtPurchaseAmount3.setBounds(544, 240, 129, 18);
		add(txtPurchaseAmount3);

		txtPurchaseAmount4 = new JTextField();
		txtPurchaseAmount4.setText("");
		txtPurchaseAmount4.setFont(new Font("Tahoma", Font.PLAIN, 10));
		txtPurchaseAmount4.setColumns(10);
		txtPurchaseAmount4.setBounds(544, 269, 129, 18);
		add(txtPurchaseAmount4);

		txtPurchaseAmount5 = new JTextField();
		txtPurchaseAmount5.setText("");
		txtPurchaseAmount5.setFont(new Font("Tahoma", Font.PLAIN, 10));
		txtPurchaseAmount5.setColumns(10);
		txtPurchaseAmount5.setBounds(544, 298, 129, 18);
		add(txtPurchaseAmount5);

		txtPurchaseAmount6 = new JTextField();
		txtPurchaseAmount6.setText("");
		txtPurchaseAmount6.setFont(new Font("Tahoma", Font.PLAIN, 10));
		txtPurchaseAmount6.setColumns(10);
		txtPurchaseAmount6.setBounds(544, 327, 129, 18);
		add(txtPurchaseAmount6);

		lblStoreName = new JLabel("<Store Name>");
		lblStoreName.setHorizontalAlignment(SwingConstants.CENTER);
		lblStoreName.setFont(new Font("Tahoma", Font.PLAIN, 30));
		lblStoreName.setBounds(10, 11, 681, 38);
		add(lblStoreName);

		btnPurchase = new JButton("Purchase");

		btnPurchase.setBounds(493, 368, 180, 52);
		add(btnPurchase);

		btnLeaveStore = new JButton("Leave Store");

		btnLeaveStore.setBounds(277, 368, 180, 52);
		add(btnLeaveStore);

		lblPurchaseAmount = new JLabel("Purchase Quantity");
		lblPurchaseAmount.setHorizontalAlignment(SwingConstants.RIGHT);
		lblPurchaseAmount.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblPurchaseAmount.setBounds(518, 143, 155, 16);
		add(lblPurchaseAmount);
		
		lblHelpText = new JLabel("You will need to at least buy Oxen before you can travel");
		lblHelpText.setBounds(402, 87, 289, 14);
		add(lblHelpText);
	}
	
	//////////////////////////////////////////////////////////////////////////////
	//
	//
	//	GETTERS AND SETTERS
	//
	//
	//////////////////////////////////////////////////////////////////////////////
	
	public void setFirstStore(boolean isFirstStore){
		this.isFirstStore = isFirstStore;
	}
	
	public boolean isFirstStore(){
		return isFirstStore;
	}
	
	public JLabel getLblHelpText(){
		return lblHelpText;
	}
	
	public JButton getPurchaseButton(){
		return btnPurchase;
	}
	
	public JButton getLeaveButton(){
		return btnLeaveStore;
	}
	
	/**
	 * @return the txtPurchaseAmount1
	 */
	public JTextField getTxtPurchaseAmount1() {
		return txtPurchaseAmount1;
	}

	/**
	 * @param txtPurchaseAmount1 the txtPurchaseAmount1 to set
	 */
	public void setTxtPurchaseAmount1(JTextField txtPurchaseAmount1) {
		this.txtPurchaseAmount1 = txtPurchaseAmount1;
	}

	/**
	 * @return the txtPurchaseAmount2
	 */
	public JTextField getTxtPurchaseAmount2() {
		return txtPurchaseAmount2;
	}

	/**
	 * @param txtPurchaseAmount2 the txtPurchaseAmount2 to set
	 */
	public void setTxtPurchaseAmount2(JTextField txtPurchaseAmount2) {
		this.txtPurchaseAmount2 = txtPurchaseAmount2;
	}

	/**
	 * @return the txtPurchaseAmount3
	 */
	public JTextField getTxtPurchaseAmount3() {
		return txtPurchaseAmount3;
	}

	/**
	 * @param txtPurchaseAmount3 the txtPurchaseAmount3 to set
	 */
	public void setTxtPurchaseAmount3(JTextField txtPurchaseAmount3) {
		this.txtPurchaseAmount3 = txtPurchaseAmount3;
	}

	/**
	 * @return the txtPurchaseAmount4
	 */
	public JTextField getTxtPurchaseAmount4() {
		return txtPurchaseAmount4;
	}

	/**
	 * @param txtPurchaseAmount4 the txtPurchaseAmount4 to set
	 */
	public void setTxtPurchaseAmount4(JTextField txtPurchaseAmount4) {
		this.txtPurchaseAmount4 = txtPurchaseAmount4;
	}

	/**
	 * @return the txtPurchaseAmount5
	 */
	public JTextField getTxtPurchaseAmount5() {
		return txtPurchaseAmount5;
	}

	/**
	 * @param txtPurchaseAmount5 the txtPurchaseAmount5 to set
	 */
	public void setTxtPurchaseAmount5(JTextField txtPurchaseAmount5) {
		this.txtPurchaseAmount5 = txtPurchaseAmount5;
	}

	/**
	 * @return the txtPurchaseAmount6
	 */
	public JTextField getTxtPurchaseAmount6() {
		return txtPurchaseAmount6;
	}

	/**
	 * @param txtPurchaseAmount6 the txtPurchaseAmount6 to set
	 */
	public void setTxtPurchaseAmount6(JTextField txtPurchaseAmount6) {
		this.txtPurchaseAmount6 = txtPurchaseAmount6;
	}

	/**
	 * @return the lblStoreQty1
	 */
	public JLabel getLblStoreQty1() {
		return lblStoreQty1;
	}

	/**
	 * @param lblStoreQty1 the lblStoreQty1 to set
	 */
	public void setLblStoreQty1(JLabel lblStoreQty1) {
		this.lblStoreQty1 = lblStoreQty1;
	}

	/**
	 * @return the lblStoreQty2
	 */
	public JLabel getLblStoreQty2() {
		return lblStoreQty2;
	}

	/**
	 * @param lblStoreQty2 the lblStoreQty2 to set
	 */
	public void setLblStoreQty2(JLabel lblStoreQty2) {
		this.lblStoreQty2 = lblStoreQty2;
	}

	/**
	 * @return the lblStoreQty3
	 */
	public JLabel getLblStoreQty3() {
		return lblStoreQty3;
	}

	/**
	 * @param lblStoreQty3 the lblStoreQty3 to set
	 */
	public void setLblStoreQty3(JLabel lblStoreQty3) {
		this.lblStoreQty3 = lblStoreQty3;
	}

	/**
	 * @return the lblStoreQty4
	 */
	public JLabel getLblStoreQty4() {
		return lblStoreQty4;
	}

	/**
	 * @param lblStoreQty4 the lblStoreQty4 to set
	 */
	public void setLblStoreQty4(JLabel lblStoreQty4) {
		this.lblStoreQty4 = lblStoreQty4;
	}

	/**
	 * @return the lblStoreQty5
	 */
	public JLabel getLblStoreQty5() {
		return lblStoreQty5;
	}

	/**
	 * @param lblStoreQty5 the lblStoreQty5 to set
	 */
	public void setLblStoreQty5(JLabel lblStoreQty5) {
		this.lblStoreQty5 = lblStoreQty5;
	}

	/**
	 * @return the lblStoreQty6
	 */
	public JLabel getLblStoreQty6() {
		return lblStoreQty6;
	}

	/**
	 * @param lblStoreQty6 the lblStoreQty6 to set
	 */
	public void setLblStoreQty6(JLabel lblStoreQty6) {
		this.lblStoreQty6 = lblStoreQty6;
	}

	/**
	 * @return the lblStorePrice6
	 */
	public JLabel getLblStorePrice6() {
		return lblStorePrice6;
	}

	/**
	 * @param lblStorePrice6 the lblStorePrice6 to set
	 */
	public void setLblStorePrice6(JLabel lblStorePrice6) {
		this.lblStorePrice6 = lblStorePrice6;
	}

	/**
	 * @return the lblStorePrice5
	 */
	public JLabel getLblStorePrice5() {
		return lblStorePrice5;
	}

	/**
	 * @param lblStorePrice5 the lblStorePrice5 to set
	 */
	public void setLblStorePrice5(JLabel lblStorePrice5) {
		this.lblStorePrice5 = lblStorePrice5;
	}

	/**
	 * @return the lblStorePrice4
	 */
	public JLabel getLblStorePrice4() {
		return lblStorePrice4;
	}

	/**
	 * @param lblStorePrice4 the lblStorePrice4 to set
	 */
	public void setLblStorePrice4(JLabel lblStorePrice4) {
		this.lblStorePrice4 = lblStorePrice4;
	}

	/**
	 * @return the lblStorePrice3
	 */
	public JLabel getLblStorePrice3() {
		return lblStorePrice3;
	}

	/**
	 * @param lblStorePrice3 the lblStorePrice3 to set
	 */
	public void setLblStorePrice3(JLabel lblStorePrice3) {
		this.lblStorePrice3 = lblStorePrice3;
	}

	/**
	 * @return the lblStorePrice2
	 */
	public JLabel getLblStorePrice2() {
		return lblStorePrice2;
	}

	/**
	 * @param lblStorePrice2 the lblStorePrice2 to set
	 */
	public void setLblStorePrice2(JLabel lblStorePrice2) {
		this.lblStorePrice2 = lblStorePrice2;
	}

	/**
	 * @return the lblStorePrice1
	 */
	public JLabel getLblStorePrice1() {
		return lblStorePrice1;
	}

	/**
	 * @param lblStorePrice1 the lblStorePrice1 to set
	 */
	public void setLblStorePrice1(JLabel lblStorePrice1) {
		this.lblStorePrice1 = lblStorePrice1;
	}

	/**
	 * @return the lblStoreWeight6
	 */
	public JLabel getLblStoreWeight6() {
		return lblStoreWeight6;
	}

	/**
	 * @param lblStoreWeight6 the lblStoreWeight6 to set
	 */
	public void setLblStoreWeight6(JLabel lblStoreWeight6) {
		this.lblStoreWeight6 = lblStoreWeight6;
	}

	/**
	 * @return the lblStoreWeight5
	 */
	public JLabel getLblStoreWeight5() {
		return lblStoreWeight5;
	}

	/**
	 * @param lblStoreWeight5 the lblStoreWeight5 to set
	 */
	public void setLblStoreWeight5(JLabel lblStoreWeight5) {
		this.lblStoreWeight5 = lblStoreWeight5;
	}

	/**
	 * @return the lblStoreWeight4
	 */
	public JLabel getLblStoreWeight4() {
		return lblStoreWeight4;
	}

	/**
	 * @param lblStoreWeight4 the lblStoreWeight4 to set
	 */
	public void setLblStoreWeight4(JLabel lblStoreWeight4) {
		this.lblStoreWeight4 = lblStoreWeight4;
	}

	/**
	 * @return the lblStoreWeight3
	 */
	public JLabel getLblStoreWeight3() {
		return lblStoreWeight3;
	}

	/**
	 * @param lblStoreWeight3 the lblStoreWeight3 to set
	 */
	public void setLblStoreWeight3(JLabel lblStoreWeight3) {
		this.lblStoreWeight3 = lblStoreWeight3;
	}

	/**
	 * @return the lblStoreWeight2
	 */
	public JLabel getLblStoreWeight2() {
		return lblStoreWeight2;
	}

	/**
	 * @param lblStoreWeight2 the lblStoreWeight2 to set
	 */
	public void setLblStoreWeight2(JLabel lblStoreWeight2) {
		this.lblStoreWeight2 = lblStoreWeight2;
	}

	/**
	 * @return the lblStoreWeight1
	 */
	public JLabel getLblStoreWeight1() {
		return lblStoreWeight1;
	}

	/**
	 * @param lblStoreWeight1 the lblStoreWeight1 to set
	 */
	public void setLblStoreWeight1(JLabel lblStoreWeight1) {
		this.lblStoreWeight1 = lblStoreWeight1;
	}

	/**
	 * @return the lblStoreName
	 */
	public JLabel getLblStoreName() {
		return lblStoreName;
	}

	/**
	 * @param lblStoreName the lblStoreName to set
	 */
	public void setLblStoreName(JLabel lblStoreName) {
		this.lblStoreName = lblStoreName;
	}

	/**
	 * @return the lblPlayerMoney
	 */
	public JLabel getLblPlayerMoney() {
		return lblPlayerMoney;
	}

	/**
	 * @param lblPlayerMoney the lblPlayerMoney to set
	 */
	public void setLblPlayerMoney(JLabel lblPlayerMoney) {
		this.lblPlayerMoney = lblPlayerMoney;
	}

	/**
	 * @return the lblPlayerWagonWeight
	 */
	public JLabel getLblPlayerWagonWeight() {
		return lblPlayerWagonWeight;
	}

	/**
	 * @param lblPlayerWagonWeight the lblPlayerWagonWeight to set
	 */
	public void setLblPlayerWagonWeight(JLabel lblPlayerWagonWeight) {
		this.lblPlayerWagonWeight = lblPlayerWagonWeight;
	}

	/**
	 * @return the lblPrice
	 */
	public JLabel getLblPrice() {
		return lblPrice;
	}

	/**
	 * @param lblPrice the lblPrice to set
	 */
	public void setLblPrice(JLabel lblPrice) {
		this.lblPrice = lblPrice;
	}

	/**
	 * @return the lblWeight
	 */
	public JLabel getLblWeight() {
		return lblWeight;
	}

	/**
	 * @param lblWeight the lblWeight to set
	 */
	public void setLblWeight(JLabel lblWeight) {
		this.lblWeight = lblWeight;
	}

	/**
	 * @return the lblQuantity
	 */
	public JLabel getLblQuantity() {
		return lblQuantity;
	}

	/**
	 * @param lblQuantity the lblQuantity to set
	 */
	public void setLblQuantity(JLabel lblQuantity) {
		this.lblQuantity = lblQuantity;
	}

	/**
	 * @return the lblPurchaseAmount
	 */
	public JLabel getLblPurchaseAmount() {
		return lblPurchaseAmount;
	}

	/**
	 * @param lblPurchaseAmount the lblPurchaseAmount to set
	 */
	public void setLblPurchaseAmount(JLabel lblPurchaseAmount) {
		this.lblPurchaseAmount = lblPurchaseAmount;
	}
}
